<script>
export default {
  props: {
    showTitle: {
      type: Boolean,
      default: true
    },
    showIcon: {
      type: Boolean,
      default: true
    },
    customStyle: {
      type: Object,
      default: () => {
        return {
          height: '2.6rem'
        }
      }
    },
    title: {
      type: String,
      default: '名称'
    },
    svgSize: {
      type: Number,
      default: 1
    }
  }
}
</script>

<template>
  <dv-border-box-2 class="screen-box" :style="customStyle">
    <div style="height: 100%;display: flex;flex-direction: column">
      <div class="box-header-icon" v-if="showIcon">
        <div class="decoration-content"></div>
      </div>
      <div class="box-title" v-if="showTitle">
        <div class="box-title-value">
          {{ title }}
        </div>
      </div>
      <slot></slot>
    </div>
  </dv-border-box-2>
</template>

<style lang="less">
.screen-box {
  flex-shrink: 0;
  .box-header-icon {
    width: 12px; height: 18px;
    .decoration-content {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  .box-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    .box-title-value {
      color: #12f2ef;
      margin-left: 18px;
      position: relative;
      &::before {
        content: "";
        position: absolute;
        left: -10px;
        top: 4px;
        width: 5px;
        height: 12px;
        border-radius: 2px;
        background: #12f2ef;
      }
    }
  }
}
</style>
